import { createStore } from "vuex";
const store = createStore({
    state: {
        smile: 'hi',
        hi: 'smile',
        count: 1,
        showDrawer: false,
        stus: [{ name: '张三', age: 20, sex: '男', score: { yw: 80, sx: 89, yy: 90 }, avatar: './img/avatar' + Math.floor(Math.random() * 10) + '.png', },
        { name: '李四', age: 20, sex: '男', score: { yw: 88, sx: 46, yy: 74 }, avatar: './img/avatar' + Math.floor(Math.random() * 10) + '.png', },
        { name: '王五', age: 20, sex: '男', score: { yw: 60, sx: 77, yy: 87 }, avatar: './img/avatar' + Math.floor(Math.random() * 10) + '.png', },]
    },
    mutations: {
        jiaYi(state) {
            state.count++
        },
        changeT(state) {
            state.showDrawer = true
        },
        changeF(state) {
            state.showDrawer = false
        },
        stusAdd(state, payload) {
            state.stus.push(payload.amount)
        }
    },
    actions: {},

}
)
export default store